<?php
/**
 * 地区管理类
 * comfiger
 * 2018-5-28
 **/
namespace Mama\Model;
use Think\Model;
class RegionModel extends Model{
	protected $tableName = 'region';

	/**
	 * 获取开通城市列表
	 **/
	public function getRegionList($regionid=0){
		return $this->where(array(
			'p_region_id' => $regionid
		))->order('region_id asc')->select();
	}

	/**
	 * 根据城市名称获取地理标识
	 **/
	public function getRegionInfoByTitle($title){
		return $this->where(array(
			'title' => array('like', $title. '%')
		))->find();
	}

}